package com.ding.easyme.app.util;

import java.util.ArrayList;
import java.util.List;

public class Stack {
	private List<String> list = new ArrayList<String>();
	
	public Stack() {
		
	}
	
	public void insert(String name) {
		list.add(name);
	}
	
	public void output(String name) {
		String str = "";
		while(!name.equalsIgnoreCase(str)) {
			if(list.size() == 0) return;
			str = list.remove(list.size() - 1);
		}
	}
	
	public boolean isEmpty() {
		return list.isEmpty();
	}

}
